<div class="row-fluid">
    <div class="box span12">
        <div class="box-header" data-original-title>
            <h2>
                <i class="icon-user"></i><span class="break"></span>
                <span class="stitle"><?= Yii::t('user', $this->modelName) ?></span>
            </h2>
        </div>

        <div class="box-content">
            <div class="row-fluid">
                <div class="pull-right">
                    <p>
                        <?php if (Users::checkAccess('create', strtolower($this->modelName))&&$this->allowCreate): ?>
                        <?php $createUrl= method_exists($this->modelName, 'getCreateUrl')?$this->model->createUrl:url(strtolower($this->modelName) . '/create') ?>
                            <a href="<?php echo $createUrl?>" class="btn btn-primary s_add_link" >
                                <i class="icon-plus"></i> <?= Yii::t('user', 'Add') ?> <span class="stitle"><?= Yii::t('user', $this->modelName) ?></span>
                            </a>
                        <?php endif; ?>
        <?php 
//        echo CHtml::ajaxLink(Yii::t('user','Delete'), array('deleteList'), array(
//            "type"    => "post",
//            "data"    => "js:{ids:$.fn.yiiGridView.getChecked('data-grid','ids')}",
//            "success" => "function(data){
//                $.fn.yiiGridView.update('data-grid'); 
//            }"),
//            array('confirm' => 'Are you sure?')); 
        ?>
                    </p>
                </div>
            </div>
            <?php
            $this->widget('application.widgets.MyBaseListView', array(
                'id' => 'data-grid',
                'filter' => $model,
                'afterAjaxUpdate' => 'function(id,data){$("[data-rel=\'chosen\'],[rel=\'chosen\']").chosen();}',
                'dataProvider' => $model->search(),
                'columns' => $this->indexColumns
            ));
            ?>
            <!--    </div>-->
        </div>
    </div>
</div>
<?php
$css = ".filters input {margin-bottom: 0px ;padding: 0px;max-width: auto;}"
    . ".chzn-container{width: 180px!important}.chzn-drop{top: 27px!important; width: 178px!important}.chzn-search input{width: 143px!important}"
    . ".box-content{min-height:400px}";
cs()->registerCss("#" . uniqid(), $css);
?>